UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PACu8WIp81au3sXNS9a/jJptgDVnFXnf/qjb852/9RQ='
WHERE
key_id = 'b1545bbbebf48b734ab13387250c2d1989b5b162775a992b55b7bb9bd9c4b333'
AND (
token = 'PACu8WIp81au3sXNS9a/jJptgDVnFXnf/qjb852/9RQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)