UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Pz2nhCPQjRojipnPCMnbsd4v/N7/kUKIdiqBPbR4oQg=' 
WHERE 
  key_id = '8d05bac8b2b0a48bf8c13525b30556d0b0bbfa6cd1ccc921f51c3c55c4cf93a6' 
  AND (
    token = 'Pz2nhCPQjRojipnPCMnbsd4v/N7/kUKIdiqBPbR4oQg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018