UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xfk98rm6w5AkfPnMLefRl953Vh9cZt3hr+nW6G2VMsw=' 
WHERE 
  key_id = 'c34fceda9d90ebdee0a20602fe6e3dc1bcfe3ed2f0ed7302b15d1be238f6b03a' 
  AND (
    token = 'xfk98rm6w5AkfPnMLefRl953Vh9cZt3hr+nW6G2VMsw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018