UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'aSliL2LZizjJiS/5tHtKZ7sftcVjv2YmfJQU4jRg9Yg=' 
WHERE 
  key_id = 'f5450d95d8abfcb8abb2e401cca015ed04049d3c2d6095ba0a828dd015920ad7' 
  AND (
    token = 'aSliL2LZizjJiS/5tHtKZ7sftcVjv2YmfJQU4jRg9Yg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047