UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j7Y1Uwbt6G8Sr4bTaGAOJ/+qn2fnazMFt9f1qfndgC0='
WHERE
key_id = '72767782239278f323e882f80e62a96db29f3cbe891693b7d238f6743bd5c52e'
AND (
token = 'j7Y1Uwbt6G8Sr4bTaGAOJ/+qn2fnazMFt9f1qfndgC0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)