UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'njvnH0klFKrw8SVrnFtvl4jq/PX7KTV4CnDdeQ00W10=' 
WHERE 
  key_id = '7235b7e7d7d1d21cab07b22cfae543d66e530f970b2680e5d698ee4eab5e6644' 
  AND (
    token = 'njvnH0klFKrw8SVrnFtvl4jq/PX7KTV4CnDdeQ00W10=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041