UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bo2tZnEVDxwKBRcbcQBOZW3sovFLiCd7iZ66TVzI1Gg='
WHERE
key_id = '7b43ba866e020ed0a0af4458890dd0ca24c09bb6ae6ee6b7d442d995bd20117c'
AND (
token = 'bo2tZnEVDxwKBRcbcQBOZW3sovFLiCd7iZ66TVzI1Gg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)