UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LbojnsvEYVJblpNhT0rUWzxRce9wC2e4F1xq5iUpQh0=' 
WHERE 
  key_id = '94d71ac1d29be5aae26af7e7a96d6b859d60816e07753115d6e0e5702ea5267f' 
  AND (
    token = 'LbojnsvEYVJblpNhT0rUWzxRce9wC2e4F1xq5iUpQh0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032