UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rtFNIRwnynNG/WDJl1BLDmEwtoG/0aD/nnwdSYs3NmM='
WHERE
key_id = 'ad4042b83879372401bfc634215d7f6980911b5f7101075e7e24fb53b5237927'
AND (
token = 'rtFNIRwnynNG/WDJl1BLDmEwtoG/0aD/nnwdSYs3NmM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)