UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RCxhktw8RPbgPFxz5b/VJzGqH/sAGxIvUy4Ly0YpnDE='
WHERE
key_id = '6da69c64b2baf29de67149b7aa2a42d002d979cc7c18d4ec77665d5d86f3154a'
AND (
token = 'RCxhktw8RPbgPFxz5b/VJzGqH/sAGxIvUy4Ly0YpnDE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)