UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+LDJ0VsmbTgG/5FVTPYqWjFUKi3TxguXfP2Ah/YJb3o='
WHERE
key_id = 'ae90e7eff5910e8524ab73893be71c939eef5cbc093df28e4a1a0721c8eae5e3'
AND (
token = '+LDJ0VsmbTgG/5FVTPYqWjFUKi3TxguXfP2Ah/YJb3o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)