UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PVEEp5ZspwX27u/jDleseuIv5wO0HWDx/XFWA89WxwY='
WHERE
key_id = '68bfd52831cf93787555a6c7355609cf60dde183ba60ebd423704c594f023c1d'
AND (
token = 'PVEEp5ZspwX27u/jDleseuIv5wO0HWDx/XFWA89WxwY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)