UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SwG2gRbp+mgtrHs+OAH/h194aYybfcHBpMsmj8z2IfU='
WHERE
key_id = '4accd6474427d02534b99ca73f21a7ae2ef98c95744b4e728315073f0b088af4'
AND (
token = 'SwG2gRbp+mgtrHs+OAH/h194aYybfcHBpMsmj8z2IfU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)