UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xOMisduu/JppJll4POLznU5zu49Gg0VnKVJWC5YUVLg='
WHERE
key_id = '890d0a4b6394a30504ffb5fbf466bfae8651e289c0fe5f0c950e7bfee10b232d'
AND (
token = 'xOMisduu/JppJll4POLznU5zu49Gg0VnKVJWC5YUVLg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)