UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cBjo/LQYzvrTHqgnxg2y6ZObAUWdizMjOG75iJqtn/c='
WHERE
key_id = '6dcffdd8a596797573e81382e0e13817e11720b096823d3c2ff4fd6eb85be947'
AND (
token = 'cBjo/LQYzvrTHqgnxg2y6ZObAUWdizMjOG75iJqtn/c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)