UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'obqWNHRdlPHO5OUJ6Ai4yogfM5S7MnsMMTu/SZlqYbQ='
WHERE
key_id = '51c66c5686ed15ef5fa89b86309bc051da653f68cf1dd46de7be215d8e1d580f'
AND (
token = 'obqWNHRdlPHO5OUJ6Ai4yogfM5S7MnsMMTu/SZlqYbQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)