UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OJwzvznYRUmYqeJg+bCWdE17GQQf6+aB/GtRWCO4k90='
WHERE
key_id = '5995a79ddd2ebaf1713c112a5608c29b1a856584e0c75187e14f7690d7095a0f'
AND (
token = 'OJwzvznYRUmYqeJg+bCWdE17GQQf6+aB/GtRWCO4k90='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)