UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4W/WjLeJ92r5iFuGH3iXMyk7IR0onZFJpOSDNhBotkI=' 
WHERE 
  key_id = 'ac7b3ad4e4e50680d4059aaefc66e1d33e676431303cdd6cee238c1bf898e3fb' 
  AND (
    token = '4W/WjLeJ92r5iFuGH3iXMyk7IR0onZFJpOSDNhBotkI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039