UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qZj/KGANEiw4G/obwdA9MYkGEVKeQpld5/Ug8j5H7UI=' 
WHERE 
  key_id = '7c19f5cb5cbf173070ca3d6d4187ffc00ffada91e311c8d5a91b5f8449e7992c' 
  AND (
    token = 'qZj/KGANEiw4G/obwdA9MYkGEVKeQpld5/Ug8j5H7UI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021