UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'scE6VV2/q1M020mVMafZPoDf5IwfQJTpVFQU4DbYkBE='
WHERE
key_id = '2028307aff9b6fe7756bd43776726cf4ed09d138194fb26522338b2e89552e6d'
AND (
token = 'scE6VV2/q1M020mVMafZPoDf5IwfQJTpVFQU4DbYkBE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)