UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '68Zl1T7x6vkXKm/xKyHO+/o+5UtWlDqBXD5OeWMp408='
WHERE
key_id = '7ed6235ed9ff3ab5f3032471b8381a33c42ccf5510d53b476ec16998786a4b38'
AND (
token = '68Zl1T7x6vkXKm/xKyHO+/o+5UtWlDqBXD5OeWMp408='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)