UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iCooLFlXQRls+u3kUq921TUEi1/mVjXV7v/WVvjojm8='
WHERE
key_id = '68ea729dd21f1c28858e76ae4e8b0150021c2e02110dd96186c56f6f09024e4f'
AND (
token = 'iCooLFlXQRls+u3kUq921TUEi1/mVjXV7v/WVvjojm8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)