UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '83PYPKUnesn3gQn2TUcxunOm1pwf4+XDdF6IVxD8wyE=' 
WHERE 
  key_id = '5411d05eef0d20f2f3855c033504efccdec68856e74401af5744d5815f676ffc' 
  AND (
    token = '83PYPKUnesn3gQn2TUcxunOm1pwf4+XDdF6IVxD8wyE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019