UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vF8XbjxtB5TkA3AmW1igJ1i/Cyr0CP9iksigoaeyM40=' 
WHERE 
  key_id = '4bbb4466a5c61bf61d74daaf8d56ed9cde7d5e0de9efab0c715ddbd84330a077' 
  AND (
    token = 'vF8XbjxtB5TkA3AmW1igJ1i/Cyr0CP9iksigoaeyM40=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035