UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bCq/uppXK/ViLK3jPjqtsG5XWSVK834hlacL3Rc609E=' 
WHERE 
  key_id = '202dc7c8381f107d30b6a1158834e425261fb2a5e3b1c85b5255ed9acbe01c43' 
  AND (
    token = 'bCq/uppXK/ViLK3jPjqtsG5XWSVK834hlacL3Rc609E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044