UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jbwO6mjd7AM+go4Hbb9tFsPZV9zsJPsAvTu6Zfze4C4=' 
WHERE 
  key_id = '0bdcfd0404ea8f4e009f56c8955bd21471dcbdc2cc3cbdcbae2259adc1f91c19' 
  AND (
    token = 'jbwO6mjd7AM+go4Hbb9tFsPZV9zsJPsAvTu6Zfze4C4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00088