UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'f+PpozVuOr7KAZkx5tSoXuAAnFiywbKsEXRb72OFZXs='
WHERE
key_id = '7680131f904010a37983c514de86f798f7b92df73729f09c0e5a13d7454127da'
AND (
token = 'f+PpozVuOr7KAZkx5tSoXuAAnFiywbKsEXRb72OFZXs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)