UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/7R8dxmZ4TkD8VqMU/3ddY6H2FOXFSW1BjJs8OkbEY4='
WHERE
key_id = '0452e22281d3bd4ee1e48a9e549db6fc1a2a2b51bbb2fd3734dd20c0dddaedaf'
AND (
token = '/7R8dxmZ4TkD8VqMU/3ddY6H2FOXFSW1BjJs8OkbEY4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)