UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rBv6OtJ5BniF2y9qJhv4i9QleChuyCH6FA3DPoG/Wro='
WHERE
key_id = '155cd7c3069181ee6af78aac5fcc058163276bef806937fd16ecaced93024fe6'
AND (
token = 'rBv6OtJ5BniF2y9qJhv4i9QleChuyCH6FA3DPoG/Wro='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)