UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jvr6S3QXX7bUHWffjBQx7A53fzPjxL58IVVO1vx/UPo=' 
WHERE 
  key_id = 'e305dd1ef041816b8545ef0810ba104556309a80b5bb5544c41e4d3cc81eafac' 
  AND (
    token = 'jvr6S3QXX7bUHWffjBQx7A53fzPjxL58IVVO1vx/UPo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033