UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5RxpqcG/JMkaaFCalP9pf6+dD1nsInoAzpqgPXSpXhI='
WHERE
key_id = '7f4852c2e12b3493bd632015375bc92d4e63d75e7f0b0871b034bfcfd4e0af6d'
AND (
token = '5RxpqcG/JMkaaFCalP9pf6+dD1nsInoAzpqgPXSpXhI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)