UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1YZHYBZQL1voZSLcd3qJRALvJWfaYYXJ2ByW9QFlbTE='
WHERE
key_id = 'fac5776ed490e0ac8032e2c9fd8b424b0b68283f315863f2b758cbc8c9035f09'
AND (
token = '1YZHYBZQL1voZSLcd3qJRALvJWfaYYXJ2ByW9QFlbTE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)