UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u/py09E43HXrDrZrjxZxCIW/2oKhU664pXYtPxlauvk='
WHERE
key_id = '2ab44ae98a0095fef3e54dd605fd9289aab0131a43003173e450eb88b3837d3d'
AND (
token = 'u/py09E43HXrDrZrjxZxCIW/2oKhU664pXYtPxlauvk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)