UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uIk86BPz14T8hdQjR8MZhqui4IGNg8hJMXmPjNiZiJQ=' 
WHERE 
  key_id = '75ded814d4183f1322ec04d45415f9195b66b30a84bbc8f4ce88726748c0802b' 
  AND (
    token = 'uIk86BPz14T8hdQjR8MZhqui4IGNg8hJMXmPjNiZiJQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014