UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'z55t4tzdHKBSSXUaT1d/T6XCR8QSfbdX+iNuD6XY1wQ='
WHERE
key_id = 'bfc3f6a930e7eef6732fc0e12f1cfd6b410d20ea21dc1f6d31875a16b53ff115'
AND (
token = 'z55t4tzdHKBSSXUaT1d/T6XCR8QSfbdX+iNuD6XY1wQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)