UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PpZxyMHw9ac+WOIgTeR3sib6I1EVq3QIaUaGLJtLaXY='
WHERE
key_id = '111b0ec9b0204fbf755ed651605ab317cc021066e084d1c9a3cd0aba82565f58'
AND (
token = 'PpZxyMHw9ac+WOIgTeR3sib6I1EVq3QIaUaGLJtLaXY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)