UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mmbQsQTkW1qtJ8h+l0X1DyOKQ5VBfNSJPBmmJNLhZGk='
WHERE
key_id = '63dacedcc01883e7c9ef3bdd427f00a561762c35792295e77302f28c22c3e9d9'
AND (
token = 'mmbQsQTkW1qtJ8h+l0X1DyOKQ5VBfNSJPBmmJNLhZGk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)