UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0PDdTszKKkuLJnCAHwPX0HLVtLqQtQA/2mzXwi63xtA=' 
WHERE 
  key_id = '5c8eb32ed8351729a7eea7d53febd7d5d57c90dbeec636bb61f8954249ac3681' 
  AND (
    token = '0PDdTszKKkuLJnCAHwPX0HLVtLqQtQA/2mzXwi63xtA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030