UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'n2ChNwkRC/PXEy5wUrVIKNjefoODSY/nsZui2fQ6tAI='
WHERE
key_id = '88d283439e27355eb6da508db4135dedba6853b69e7668ecf7f682caf4e3a470'
AND (
token = 'n2ChNwkRC/PXEy5wUrVIKNjefoODSY/nsZui2fQ6tAI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)