UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4dnu76VG/AC6mmjrAzaogkumzoYz5qj9TisbnvF++Ac='
WHERE
key_id = 'ff9d748926cef424bacc46854f8ebf0dcf0460f8f638af5cc7d5e7a06d457d39'
AND (
token = '4dnu76VG/AC6mmjrAzaogkumzoYz5qj9TisbnvF++Ac='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)