UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'I5EbMJjR1LwebUqPf4obdC2Q2eOkN8e06rRqAyaYpKU=' 
WHERE 
  key_id = 'ad6db5cb3075364ea2a8e3836759e08cd1f1c5dcc7523f8c6ffcf6217179e1c7' 
  AND (
    token = 'I5EbMJjR1LwebUqPf4obdC2Q2eOkN8e06rRqAyaYpKU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032