UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SUSSQxOqS8XE5CT8B5SrcZ5iMSEj4pz6duth3Q5MjyY='
WHERE
key_id = '8408dc64fc7d25baac12095e86e306c099ff2491b772933ced2b2f942cb1b2bf'
AND (
token = 'SUSSQxOqS8XE5CT8B5SrcZ5iMSEj4pz6duth3Q5MjyY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)