UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OAkNqZua20JRC1pp7UREaZNPbiCL/OoySNiZWhUiS50=' 
WHERE 
  key_id = '56a9e4e1bed12b640fada4b745a7d28a35936e60f401fa5d44b0e1e94d60a445' 
  AND (
    token = 'OAkNqZua20JRC1pp7UREaZNPbiCL/OoySNiZWhUiS50=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033