UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EfUoBtiEIYxJEGtEivB5WoPn3W5DbEu/BapbMxSARaY='
WHERE
key_id = '26e0e34862c748a728214d3f2399cf1036da1e86aa1354322211b3d9a1f59d5f'
AND (
token = 'EfUoBtiEIYxJEGtEivB5WoPn3W5DbEu/BapbMxSARaY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)